package com.thinkgsp.jxc.model;

import java.math.BigDecimal;
import java.sql.Date;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 采购与销售历史
 * @author evan
 *
 */
public class BillHistory extends BaseModel {

	private static final long serialVersionUID = -8037634776944691247L;

	private Long id;
	private Long billId;
	private String billCode;
	private Date billDate;
	private Integer billType;
	private String billName;
	private Integer custId;
	private String custCode;
	private String custName;
	private Integer deptId;
	private String deptName;
	private Integer empId;
	private String empName;
	private Integer makerId;
	private String makerName;
	private Long batchNoId;
	private String batchNo;
	private Date manufDate;
	private Date expDate;
	private Integer productId;
	private BigDecimal quantity;
	private BigDecimal taxRate;
	private BigDecimal price;
	private BigDecimal settlePrice;
	private BigDecimal costPrice;
	private Integer invAddId;
	private String invAddName;

	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the billId
	 */
	public Long getBillId() {
		return billId;
	}

	/**
	 * @param billId the billId to set
	 */
	public void setBillId(Long billId) {
		this.billId = billId;
	}

	/**
	 * @return the billCode
	 */
	public String getBillCode() {
		return billCode;
	}

	/**
	 * @param billCode the billCode to set
	 */
	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}

	/**
	 * @return the billDate
	 */
	public Date getBillDate() {
		return billDate;
	}

	/**
	 * @param billDate the billDate to set
	 */
	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}

	/**
	 * @return the billType
	 */
	public Integer getBillType() {
		return billType;
	}

	/**
	 * @param billType the billType to set
	 */
	public void setBillType(Integer billType) {
		this.billType = billType;
	}

	/**
	 * @return the billName
	 */
	public String getBillName() {
		return billName;
	}

	/**
	 * @param billName the billName to set
	 */
	public void setBillName(String billName) {
		this.billName = billName;
	}

	/**
	 * @return the custId
	 */
	public Integer getCustId() {
		return custId;
	}

	/**
	 * @param custId the custId to set
	 */
	public void setCustId(Integer custId) {
		this.custId = custId;
	}

	/**
	 * @return the custCode
	 */
	public String getCustCode() {
		return custCode;
	}

	/**
	 * @param custCode the custCode to set
	 */
	public void setCustCode(String custCode) {
		this.custCode = custCode;
	}

	/**
	 * @return the custName
	 */
	public String getCustName() {
		return custName;
	}

	/**
	 * @param custName the custName to set
	 */
	public void setCustName(String custName) {
		this.custName = custName;
	}

	/**
	 * @return the deptId
	 */
	public Integer getDeptId() {
		return deptId;
	}

	/**
	 * @param deptId the deptId to set
	 */
	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	/**
	 * @return the deptName
	 */
	public String getDeptName() {
		return deptName;
	}

	/**
	 * @param deptName the deptName to set
	 */
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	/**
	 * @return the empId
	 */
	public Integer getEmpId() {
		return empId;
	}

	/**
	 * @param empId the empId to set
	 */
	public void setEmpId(Integer empId) {
		this.empId = empId;
	}

	/**
	 * @return the empName
	 */
	public String getEmpName() {
		return empName;
	}

	/**
	 * @param empName the empName to set
	 */
	public void setEmpName(String empName) {
		this.empName = empName;
	}

	/**
	 * @return the makerId
	 */
	public Integer getMakerId() {
		return makerId;
	}

	/**
	 * @param makerId the makerId to set
	 */
	public void setMakerId(Integer makerId) {
		this.makerId = makerId;
	}

	/**
	 * @return the makerName
	 */
	public String getMakerName() {
		return makerName;
	}

	/**
	 * @param makerName the makerName to set
	 */
	public void setMakerName(String makerName) {
		this.makerName = makerName;
	}

	/**
	 * @return the batchNoId
	 */
	public Long getBatchNoId() {
		return batchNoId;
	}

	/**
	 * @param batchNoId the batchNoId to set
	 */
	public void setBatchNoId(Long batchNoId) {
		this.batchNoId = batchNoId;
	}

	/**
	 * @return the batchNo
	 */
	public String getBatchNo() {
		return batchNo;
	}

	/**
	 * @param batchNo the batchNo to set
	 */
	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}

	/**
	 * @return the manufDate
	 */
	public Date getManufDate() {
		return manufDate;
	}

	/**
	 * @param manufDate the manufDate to set
	 */
	public void setManufDate(Date manufDate) {
		this.manufDate = manufDate;
	}

	/**
	 * @return the expDate
	 */
	public Date getExpDate() {
		return expDate;
	}

	/**
	 * @param expDate the expDate to set
	 */
	public void setExpDate(Date expDate) {
		this.expDate = expDate;
	}

	/**
	 * @return the productId
	 */
	public Integer getProductId() {
		return productId;
	}

	/**
	 * @param productId the productId to set
	 */
	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	/**
	 * @return the quantity
	 */
	public BigDecimal getQuantity() {
		return quantity;
	}

	/**
	 * @param quantity the quantity to set
	 */
	public void setQuantity(BigDecimal quantity) {
		this.quantity = quantity;
	}

	/**
	 * @return the taxRate
	 */
	public BigDecimal getTaxRate() {
		return taxRate;
	}

	/**
	 * @param taxRate the taxRate to set
	 */
	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	/**
	 * @return the price
	 */
	public BigDecimal getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	/**
	 * @return the settlePrice
	 */
	public BigDecimal getSettlePrice() {
		return settlePrice;
	}

	/**
	 * @param settlePrice the settlePrice to set
	 */
	public void setSettlePrice(BigDecimal settlePrice) {
		this.settlePrice = settlePrice;
	}

	/**
	 * @return the costPrice
	 */
	public BigDecimal getCostPrice() {
		return costPrice;
	}

	/**
	 * @param costPrice the costPrice to set
	 */
	public void setCostPrice(BigDecimal costPrice) {
		this.costPrice = costPrice;
	}

	/**
	 * @return the invAddId
	 */
	public Integer getInvAddId() {
		return invAddId;
	}

	/**
	 * @param invAddId the invAddId to set
	 */
	public void setInvAddId(Integer invAddId) {
		this.invAddId = invAddId;
	}

	/**
	 * @return the invAddName
	 */
	public String getInvAddName() {
		return invAddName;
	}

	/**
	 * @param invAddName the invAddName to set
	 */
	public void setInvAddName(String invAddName) {
		this.invAddName = invAddName;
	}

	@Override
	public String toString() {
		ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE);
		sb.append("id",this.id)
		  .append("custId",this.custId)
		  .append("billId",this.billId)
		  .append("invAddId",this.invAddId)
		  .append("productId",this.productId)
		  .append("batchNoId",this.batchNoId)
		  .append("quantity",this.quantity)
		  .append("price",this.price)
		  .append("settlePrice",this.settlePrice);
		
		return sb.toString();
	}

	@Override
	public boolean equals(Object o) {
		if(this == o) {
			return true;
		}
		if(!(o instanceof BillHistory)) {
			return false;
		}
		final BillHistory bh = (BillHistory)o;
		if(id != null) {
			return id.equals(bh.getId());
		} else {
			return bh.getId() == null;
		}
	}

	@Override
	public int hashCode() {
		return (this.id != null ? this.id.hashCode() : 0);
	}

}
